package com.ies.dx.dex.file;

import java.util.Iterator;
import java.util.Vector;

import com.ies.dx.util.Input;

public class type_list extends dex_item
{
    private int size; //uint 
    private Vector list = new Vector();

    public type_list(dex_file file)
    {
        super(file);
    }

    public void read(Input dis)
    {
        try
        {
            size = dis.readInt();
            for (int i = 0; i < size; i ++)
            {
                type_item ti = new type_item(mFile);
                ti.read(dis);
                list.add(ti);
            }
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        
    }
    
    public void show()
    {
        
    }
    
    public String getTypes()
    {
        StringBuffer sb = new StringBuffer("(");
        for (Iterator it = list.iterator(); it.hasNext(); )
        {
            type_item ti = (type_item)it.next();
            sb.append(ti.getData()).append(", ");
        }
        sb.append(")");
        return sb.toString();
    }
    
    public String getData()
    {
        return getTypes();
    }

    @Override
    public void readData(Input dis)
    {
        // TODO Auto-generated method stub
        
    }
        
}
